/*
 Navicat Premium Data Transfer

 Source Server         : Sql Server
 Source Server Type    : SQL Server
 Source Server Version : 15002101 (15.00.2101)
 Source Host           : localhost:1433
 Source Catalog        : wscc
 Source Schema         : dbo

 Target Server Type    : SQL Server
 Target Server Version : 15002101 (15.00.2101)
 File Encoding         : 65001

 Date: 11/03/2024 19:26:10
*/


-- ----------------------------
-- Table structure for achievement
-- ----------------------------
IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[achievement]') AND type IN ('U'))
	DROP TABLE [dbo].[achievement]
GO

CREATE TABLE [dbo].[achievement] (
  [achievement_id] int  IDENTITY(1,1) NOT NULL,
  [achievement_name] varchar(255) COLLATE Chinese_PRC_CI_AS  NOT NULL,
  [achievement_content] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [release_time] date  NULL,
  [create_time] datetime  NULL,
  [update_time] datetime  NULL,
  [type] int  NULL,
  [link] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL
)
GO

ALTER TABLE [dbo].[achievement] SET (LOCK_ESCALATION = TABLE)
GO

EXEC sp_addextendedproperty
'MS_Description', N'成果ID',
'SCHEMA', N'dbo',
'TABLE', N'achievement',
'COLUMN', N'achievement_id'
GO

EXEC sp_addextendedproperty
'MS_Description', N'成果名称',
'SCHEMA', N'dbo',
'TABLE', N'achievement',
'COLUMN', N'achievement_name'
GO

EXEC sp_addextendedproperty
'MS_Description', N'成功描述',
'SCHEMA', N'dbo',
'TABLE', N'achievement',
'COLUMN', N'achievement_content'
GO

EXEC sp_addextendedproperty
'MS_Description', N'发布时间',
'SCHEMA', N'dbo',
'TABLE', N'achievement',
'COLUMN', N'release_time'
GO

EXEC sp_addextendedproperty
'MS_Description', N'创建时间',
'SCHEMA', N'dbo',
'TABLE', N'achievement',
'COLUMN', N'create_time'
GO

EXEC sp_addextendedproperty
'MS_Description', N'更新时间',
'SCHEMA', N'dbo',
'TABLE', N'achievement',
'COLUMN', N'update_time'
GO

EXEC sp_addextendedproperty
'MS_Description', N'类型',
'SCHEMA', N'dbo',
'TABLE', N'achievement',
'COLUMN', N'type'
GO


-- ----------------------------
-- Records of achievement
-- ----------------------------
SET IDENTITY_INSERT [dbo].[achievement] ON
GO

SET IDENTITY_INSERT [dbo].[achievement] OFF
GO


-- ----------------------------
-- Table structure for achievement_try
-- ----------------------------
IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[achievement_try]') AND type IN ('U'))
	DROP TABLE [dbo].[achievement_try]
GO

CREATE TABLE [dbo].[achievement_try] (
  [id] int  IDENTITY(1,1) NOT NULL,
  [achievement_id] int  NULL,
  [applicant_id] int  NULL,
  [applicant_company] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [applicant_department] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [applicant_position] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [applicant_email] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [applicant_msg] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [isPass] tinyint  NULL
)
GO

ALTER TABLE [dbo].[achievement_try] SET (LOCK_ESCALATION = TABLE)
GO

EXEC sp_addextendedproperty
'MS_Description', N'主键id',
'SCHEMA', N'dbo',
'TABLE', N'achievement_try',
'COLUMN', N'id'
GO

EXEC sp_addextendedproperty
'MS_Description', N'成果id',
'SCHEMA', N'dbo',
'TABLE', N'achievement_try',
'COLUMN', N'achievement_id'
GO

EXEC sp_addextendedproperty
'MS_Description', N'申请人id',
'SCHEMA', N'dbo',
'TABLE', N'achievement_try',
'COLUMN', N'applicant_id'
GO

EXEC sp_addextendedproperty
'MS_Description', N'申请人公司',
'SCHEMA', N'dbo',
'TABLE', N'achievement_try',
'COLUMN', N'applicant_company'
GO

EXEC sp_addextendedproperty
'MS_Description', N'申请人部门',
'SCHEMA', N'dbo',
'TABLE', N'achievement_try',
'COLUMN', N'applicant_department'
GO

EXEC sp_addextendedproperty
'MS_Description', N'申请人职位',
'SCHEMA', N'dbo',
'TABLE', N'achievement_try',
'COLUMN', N'applicant_position'
GO

EXEC sp_addextendedproperty
'MS_Description', N'申请人邮箱',
'SCHEMA', N'dbo',
'TABLE', N'achievement_try',
'COLUMN', N'applicant_email'
GO

EXEC sp_addextendedproperty
'MS_Description', N'申请人留言',
'SCHEMA', N'dbo',
'TABLE', N'achievement_try',
'COLUMN', N'applicant_msg'
GO

EXEC sp_addextendedproperty
'MS_Description', N'是否通过',
'SCHEMA', N'dbo',
'TABLE', N'achievement_try',
'COLUMN', N'isPass'
GO


-- ----------------------------
-- Records of achievement_try
-- ----------------------------
SET IDENTITY_INSERT [dbo].[achievement_try] ON
GO

SET IDENTITY_INSERT [dbo].[achievement_try] OFF
GO


-- ----------------------------
-- Table structure for activity
-- ----------------------------
IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[activity]') AND type IN ('U'))
	DROP TABLE [dbo].[activity]
GO

CREATE TABLE [dbo].[activity] (
  [activity_id] int  IDENTITY(1,1) NOT NULL,
  [activity_name] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [activity_date] date  NULL,
  [activity_starttime] time(7)  NULL,
  [activity_endtime] time(7)  NULL,
  [location] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [content] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [subscriber_num] int  NULL,
  [looking] int DEFAULT 0 NULL,
  [likes] int DEFAULT 0 NULL,
  [picture] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [type] int  NULL,
  [live_link] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [video_link] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [speaker_id1] int  NULL,
  [speaker_id2] int  NULL,
  [speaker_id3] int  NULL
)
GO

ALTER TABLE [dbo].[activity] SET (LOCK_ESCALATION = TABLE)
GO

EXEC sp_addextendedproperty
'MS_Description', N'活动id',
'SCHEMA', N'dbo',
'TABLE', N'activity',
'COLUMN', N'activity_id'
GO

EXEC sp_addextendedproperty
'MS_Description', N'活动名称',
'SCHEMA', N'dbo',
'TABLE', N'activity',
'COLUMN', N'activity_name'
GO

EXEC sp_addextendedproperty
'MS_Description', N'日期：2024-12-01',
'SCHEMA', N'dbo',
'TABLE', N'activity',
'COLUMN', N'activity_date'
GO

EXEC sp_addextendedproperty
'MS_Description', N'活动时间：00：00：00',
'SCHEMA', N'dbo',
'TABLE', N'activity',
'COLUMN', N'activity_starttime'
GO

EXEC sp_addextendedproperty
'MS_Description', N'活动结束时间同上',
'SCHEMA', N'dbo',
'TABLE', N'activity',
'COLUMN', N'activity_endtime'
GO

EXEC sp_addextendedproperty
'MS_Description', N'地点',
'SCHEMA', N'dbo',
'TABLE', N'activity',
'COLUMN', N'location'
GO

EXEC sp_addextendedproperty
'MS_Description', N'活动简述',
'SCHEMA', N'dbo',
'TABLE', N'activity',
'COLUMN', N'content'
GO

EXEC sp_addextendedproperty
'MS_Description', N'订阅人数',
'SCHEMA', N'dbo',
'TABLE', N'activity',
'COLUMN', N'subscriber_num'
GO

EXEC sp_addextendedproperty
'MS_Description', N'浏览量',
'SCHEMA', N'dbo',
'TABLE', N'activity',
'COLUMN', N'looking'
GO

EXEC sp_addextendedproperty
'MS_Description', N'点赞量',
'SCHEMA', N'dbo',
'TABLE', N'activity',
'COLUMN', N'likes'
GO

EXEC sp_addextendedproperty
'MS_Description', N'封面图片',
'SCHEMA', N'dbo',
'TABLE', N'activity',
'COLUMN', N'picture'
GO

EXEC sp_addextendedproperty
'MS_Description', N'种类：1格致论道，2西湖论剑安全特训营，3新品发布，4第二直播间，5掌上论剑，6西湖论剑十周年回顾',
'SCHEMA', N'dbo',
'TABLE', N'activity',
'COLUMN', N'type'
GO

EXEC sp_addextendedproperty
'MS_Description', N'直播链接',
'SCHEMA', N'dbo',
'TABLE', N'activity',
'COLUMN', N'live_link'
GO

EXEC sp_addextendedproperty
'MS_Description', N'回放地址',
'SCHEMA', N'dbo',
'TABLE', N'activity',
'COLUMN', N'video_link'
GO

EXEC sp_addextendedproperty
'MS_Description', N'演讲人id',
'SCHEMA', N'dbo',
'TABLE', N'activity',
'COLUMN', N'speaker_id1'
GO

EXEC sp_addextendedproperty
'MS_Description', N'演讲人id',
'SCHEMA', N'dbo',
'TABLE', N'activity',
'COLUMN', N'speaker_id2'
GO

EXEC sp_addextendedproperty
'MS_Description', N'演讲人id',
'SCHEMA', N'dbo',
'TABLE', N'activity',
'COLUMN', N'speaker_id3'
GO


-- ----------------------------
-- Records of activity
-- ----------------------------
SET IDENTITY_INSERT [dbo].[activity] ON
GO

INSERT INTO [dbo].[activity] ([activity_id], [activity_name], [activity_date], [activity_starttime], [activity_endtime], [location], [content], [subscriber_num], [looking], [likes], [picture], [type], [live_link], [video_link], [speaker_id1], [speaker_id2], [speaker_id3]) VALUES (N'1', N'格致论道@西湖论剑格致论道@西湖论剑', N'2024-03-10', N'18:30:00.0000000', N'21:45:00.0000000', NULL, NULL, N'123', N'123', N'11', N'D:\data\img\Snipaste_2024-03-08_00-08-47.png', N'1', NULL, NULL, NULL, NULL, NULL)
GO

SET IDENTITY_INSERT [dbo].[activity] OFF
GO


-- ----------------------------
-- Table structure for activity_checkin
-- ----------------------------
IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[activity_checkin]') AND type IN ('U'))
	DROP TABLE [dbo].[activity_checkin]
GO

CREATE TABLE [dbo].[activity_checkin] (
  [activity_checkin_id] int  IDENTITY(1,1) NOT NULL,
  [activity_checkin_starttime] datetime  NULL,
  [activity_checkin_endtime] datetime  NULL,
  [activity_id] int  NOT NULL
)
GO

ALTER TABLE [dbo].[activity_checkin] SET (LOCK_ESCALATION = TABLE)
GO

EXEC sp_addextendedproperty
'MS_Description', N'活动签到ID',
'SCHEMA', N'dbo',
'TABLE', N'activity_checkin',
'COLUMN', N'activity_checkin_id'
GO

EXEC sp_addextendedproperty
'MS_Description', N'签到开始时间',
'SCHEMA', N'dbo',
'TABLE', N'activity_checkin',
'COLUMN', N'activity_checkin_starttime'
GO

EXEC sp_addextendedproperty
'MS_Description', N'签到结束时间',
'SCHEMA', N'dbo',
'TABLE', N'activity_checkin',
'COLUMN', N'activity_checkin_endtime'
GO

EXEC sp_addextendedproperty
'MS_Description', N'活动id',
'SCHEMA', N'dbo',
'TABLE', N'activity_checkin',
'COLUMN', N'activity_id'
GO


-- ----------------------------
-- Records of activity_checkin
-- ----------------------------
SET IDENTITY_INSERT [dbo].[activity_checkin] ON
GO

SET IDENTITY_INSERT [dbo].[activity_checkin] OFF
GO


-- ----------------------------
-- Table structure for activity_comment
-- ----------------------------
IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[activity_comment]') AND type IN ('U'))
	DROP TABLE [dbo].[activity_comment]
GO

CREATE TABLE [dbo].[activity_comment] (
  [activity_comment_id] int  IDENTITY(1,1) NOT NULL,
  [activity_id] int  NOT NULL,
  [user_id] int  NOT NULL,
  [comment_content] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [like] int DEFAULT 0 NULL,
  [comment_time] datetime  NULL,
  [comment_type] tinyint DEFAULT 0 NULL
)
GO

ALTER TABLE [dbo].[activity_comment] SET (LOCK_ESCALATION = TABLE)
GO

EXEC sp_addextendedproperty
'MS_Description', N'活动区评论ID',
'SCHEMA', N'dbo',
'TABLE', N'activity_comment',
'COLUMN', N'activity_comment_id'
GO

EXEC sp_addextendedproperty
'MS_Description', N'活动id',
'SCHEMA', N'dbo',
'TABLE', N'activity_comment',
'COLUMN', N'activity_id'
GO

EXEC sp_addextendedproperty
'MS_Description', N'用户id',
'SCHEMA', N'dbo',
'TABLE', N'activity_comment',
'COLUMN', N'user_id'
GO

EXEC sp_addextendedproperty
'MS_Description', N'评论内容',
'SCHEMA', N'dbo',
'TABLE', N'activity_comment',
'COLUMN', N'comment_content'
GO

EXEC sp_addextendedproperty
'MS_Description', N'点赞数',
'SCHEMA', N'dbo',
'TABLE', N'activity_comment',
'COLUMN', N'like'
GO

EXEC sp_addextendedproperty
'MS_Description', N'评论时间',
'SCHEMA', N'dbo',
'TABLE', N'activity_comment',
'COLUMN', N'comment_time'
GO

EXEC sp_addextendedproperty
'MS_Description', N'1为评论区，2为弹幕',
'SCHEMA', N'dbo',
'TABLE', N'activity_comment',
'COLUMN', N'comment_type'
GO


-- ----------------------------
-- Records of activity_comment
-- ----------------------------
SET IDENTITY_INSERT [dbo].[activity_comment] ON
GO

SET IDENTITY_INSERT [dbo].[activity_comment] OFF
GO


-- ----------------------------
-- Table structure for activity_prize
-- ----------------------------
IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[activity_prize]') AND type IN ('U'))
	DROP TABLE [dbo].[activity_prize]
GO

CREATE TABLE [dbo].[activity_prize] (
  [activity_prize_id] int  IDENTITY(1,1) NOT NULL,
  [luckydraw_id] int  NOT NULL,
  [num] int  NULL,
  [prize_num] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [prize_content] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL
)
GO

ALTER TABLE [dbo].[activity_prize] SET (LOCK_ESCALATION = TABLE)
GO

EXEC sp_addextendedproperty
'MS_Description', N'活动奖品id',
'SCHEMA', N'dbo',
'TABLE', N'activity_prize',
'COLUMN', N'activity_prize_id'
GO

EXEC sp_addextendedproperty
'MS_Description', N'抽奖活动id',
'SCHEMA', N'dbo',
'TABLE', N'activity_prize',
'COLUMN', N'luckydraw_id'
GO

EXEC sp_addextendedproperty
'MS_Description', N'库存数量',
'SCHEMA', N'dbo',
'TABLE', N'activity_prize',
'COLUMN', N'num'
GO

EXEC sp_addextendedproperty
'MS_Description', N'奖品图片',
'SCHEMA', N'dbo',
'TABLE', N'activity_prize',
'COLUMN', N'prize_num'
GO

EXEC sp_addextendedproperty
'MS_Description', N'奖品信息',
'SCHEMA', N'dbo',
'TABLE', N'activity_prize',
'COLUMN', N'prize_content'
GO


-- ----------------------------
-- Records of activity_prize
-- ----------------------------
SET IDENTITY_INSERT [dbo].[activity_prize] ON
GO

SET IDENTITY_INSERT [dbo].[activity_prize] OFF
GO


-- ----------------------------
-- Table structure for activity_sub
-- ----------------------------
IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[activity_sub]') AND type IN ('U'))
	DROP TABLE [dbo].[activity_sub]
GO

CREATE TABLE [dbo].[activity_sub] (
  [activity_sub_id] int  IDENTITY(1,1) NOT NULL,
  [activity_id] int  NOT NULL,
  [user_id] int  NOT NULL,
  [subscription_time] datetime  NULL
)
GO

ALTER TABLE [dbo].[activity_sub] SET (LOCK_ESCALATION = TABLE)
GO

EXEC sp_addextendedproperty
'MS_Description', N'活动订阅ID',
'SCHEMA', N'dbo',
'TABLE', N'activity_sub',
'COLUMN', N'activity_sub_id'
GO

EXEC sp_addextendedproperty
'MS_Description', N'活动ID',
'SCHEMA', N'dbo',
'TABLE', N'activity_sub',
'COLUMN', N'activity_id'
GO

EXEC sp_addextendedproperty
'MS_Description', N'用户ID',
'SCHEMA', N'dbo',
'TABLE', N'activity_sub',
'COLUMN', N'user_id'
GO

EXEC sp_addextendedproperty
'MS_Description', N'订阅时间',
'SCHEMA', N'dbo',
'TABLE', N'activity_sub',
'COLUMN', N'subscription_time'
GO


-- ----------------------------
-- Records of activity_sub
-- ----------------------------
SET IDENTITY_INSERT [dbo].[activity_sub] ON
GO

SET IDENTITY_INSERT [dbo].[activity_sub] OFF
GO


-- ----------------------------
-- Table structure for agenda
-- ----------------------------
IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[agenda]') AND type IN ('U'))
	DROP TABLE [dbo].[agenda]
GO

CREATE TABLE [dbo].[agenda] (
  [agenda_id] int  IDENTITY(1,1) NOT NULL,
  [agenda_name] varchar(100) COLLATE Chinese_PRC_CI_AS  NOT NULL,
  [agenda_date] date  NULL,
  [agenda_starttime] time(7)  NULL,
  [agenda_endtime] time(7)  NULL,
  [type] tinyint  NULL,
  [location] varchar(50) COLLATE Chinese_PRC_CI_AS  NULL,
  [is_live] tinyint DEFAULT 0 NULL,
  [video_link] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [agenda_subscriber_num] int DEFAULT 0 NULL,
  [popularity] float(53) DEFAULT 1.0 NULL,
  [agenda_content] varchar(127) COLLATE Chinese_PRC_CI_AS  NULL,
  [live_link] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL
)
GO

ALTER TABLE [dbo].[agenda] SET (LOCK_ESCALATION = TABLE)
GO

EXEC sp_addextendedproperty
'MS_Description', N'议程ID',
'SCHEMA', N'dbo',
'TABLE', N'agenda',
'COLUMN', N'agenda_id'
GO

EXEC sp_addextendedproperty
'MS_Description', N'议程名',
'SCHEMA', N'dbo',
'TABLE', N'agenda',
'COLUMN', N'agenda_name'
GO

EXEC sp_addextendedproperty
'MS_Description', N'议程日期如：2024-01-01',
'SCHEMA', N'dbo',
'TABLE', N'agenda',
'COLUMN', N'agenda_date'
GO

EXEC sp_addextendedproperty
'MS_Description', N'议程开始时间：09：00：00',
'SCHEMA', N'dbo',
'TABLE', N'agenda',
'COLUMN', N'agenda_starttime'
GO

EXEC sp_addextendedproperty
'MS_Description', N'议程结束时间：12：00：00',
'SCHEMA', N'dbo',
'TABLE', N'agenda',
'COLUMN', N'agenda_endtime'
GO

EXEC sp_addextendedproperty
'MS_Description', N'论坛类型：1为主论坛，2为平行论坛，3为科普论坛，4为掌上论剑，5为生态合作论坛',
'SCHEMA', N'dbo',
'TABLE', N'agenda',
'COLUMN', N'type'
GO

EXEC sp_addextendedproperty
'MS_Description', N'如：杭州市滨江区文化中心剧院一层',
'SCHEMA', N'dbo',
'TABLE', N'agenda',
'COLUMN', N'location'
GO

EXEC sp_addextendedproperty
'MS_Description', N'是否直播：0为不直播，1为直播，2为回放',
'SCHEMA', N'dbo',
'TABLE', N'agenda',
'COLUMN', N'is_live'
GO

EXEC sp_addextendedproperty
'MS_Description', N'视频回放链接',
'SCHEMA', N'dbo',
'TABLE', N'agenda',
'COLUMN', N'video_link'
GO

EXEC sp_addextendedproperty
'MS_Description', N'议程订阅人数',
'SCHEMA', N'dbo',
'TABLE', N'agenda',
'COLUMN', N'agenda_subscriber_num'
GO

EXEC sp_addextendedproperty
'MS_Description', N'热度',
'SCHEMA', N'dbo',
'TABLE', N'agenda',
'COLUMN', N'popularity'
GO

EXEC sp_addextendedproperty
'MS_Description', N'议程介绍',
'SCHEMA', N'dbo',
'TABLE', N'agenda',
'COLUMN', N'agenda_content'
GO

EXEC sp_addextendedproperty
'MS_Description', N'直播链接',
'SCHEMA', N'dbo',
'TABLE', N'agenda',
'COLUMN', N'live_link'
GO


-- ----------------------------
-- Records of agenda
-- ----------------------------
SET IDENTITY_INSERT [dbo].[agenda] ON
GO

INSERT INTO [dbo].[agenda] ([agenda_id], [agenda_name], [agenda_date], [agenda_starttime], [agenda_endtime], [type], [location], [is_live], [video_link], [agenda_subscriber_num], [popularity], [agenda_content], [live_link]) VALUES (N'1', N'格致论道@西湖论剑
', N'2024-03-02', N'18:00:00.0000000', N'21:00:00.0000000', N'3', N'杭州市滨江区文化中心剧院一层', N'0', N'', N'123', N'11', N'', N'rtmp://192.168.187.163:1935/live/test')
GO

INSERT INTO [dbo].[agenda] ([agenda_id], [agenda_name], [agenda_date], [agenda_starttime], [agenda_endtime], [type], [location], [is_live], [video_link], [agenda_subscriber_num], [popularity], [agenda_content], [live_link]) VALUES (N'2', N'95后极客青年Talk', N'2024-03-03', N'10:00:00.0000000', N'10:30:00.0000000', N'4', N'线上直播', N'1', N'http://192.168.187.163:8080/live/test.m3u8', N'0', N'1', N'', N'rtmp://192.168.187.163:1935/live/test')
GO

INSERT INTO [dbo].[agenda] ([agenda_id], [agenda_name], [agenda_date], [agenda_starttime], [agenda_endtime], [type], [location], [is_live], [video_link], [agenda_subscriber_num], [popularity], [agenda_content], [live_link]) VALUES (N'3', N'当科幻照进现实我们会更安全吗？', N'2024-05-05', N'13:00:00.0000000', N'13:30:00.0000000', N'3', N'线上直播', N'1', N'http://192.168.187.163:8080/live/test.m3u8', N'0', N'0', N'', N'http://192.168.187.163:8080/live/test.m3u8')
GO

INSERT INTO [dbo].[agenda] ([agenda_id], [agenda_name], [agenda_date], [agenda_starttime], [agenda_endtime], [type], [location], [is_live], [video_link], [agenda_subscriber_num], [popularity], [agenda_content], [live_link]) VALUES (N'4', N'人工智能会颠覆安全行业吗？', N'2024-05-01', N'11:00:00.0000000', N'11:30:00.0000000', N'3', N'线上直播', N'1', N'1', N'0', N'1', N'', N'http://192.168.187.163:8080/live/test.m3u8')
GO

INSERT INTO [dbo].[agenda] ([agenda_id], [agenda_name], [agenda_date], [agenda_starttime], [agenda_endtime], [type], [location], [is_live], [video_link], [agenda_subscriber_num], [popularity], [agenda_content], [live_link]) VALUES (N'5', N'反诈直播间@西湖论剑', N'2024-01-22', N'15:30:00.0000000', N'16:30:00.0000000', N'0', N'线上直播', N'1', N'11', N'0', N'0', N'', N'http://192.168.187.163:8080/live/test.m3u8')
GO

SET IDENTITY_INSERT [dbo].[agenda] OFF
GO


-- ----------------------------
-- Table structure for agenda_comment
-- ----------------------------
IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[agenda_comment]') AND type IN ('U'))
	DROP TABLE [dbo].[agenda_comment]
GO

CREATE TABLE [dbo].[agenda_comment] (
  [agenda_comment_id] int  IDENTITY(1,1) NOT NULL,
  [agenda_id] int  NOT NULL,
  [user_id] int  NOT NULL,
  [comment_content] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [like] int DEFAULT 0 NULL,
  [comment_time] datetime  NULL,
  [comment_type] tinyint  NULL
)
GO

ALTER TABLE [dbo].[agenda_comment] SET (LOCK_ESCALATION = TABLE)
GO

EXEC sp_addextendedproperty
'MS_Description', N'议程评论ID',
'SCHEMA', N'dbo',
'TABLE', N'agenda_comment',
'COLUMN', N'agenda_comment_id'
GO

EXEC sp_addextendedproperty
'MS_Description', N'议程id',
'SCHEMA', N'dbo',
'TABLE', N'agenda_comment',
'COLUMN', N'agenda_id'
GO

EXEC sp_addextendedproperty
'MS_Description', N'用户id',
'SCHEMA', N'dbo',
'TABLE', N'agenda_comment',
'COLUMN', N'user_id'
GO

EXEC sp_addextendedproperty
'MS_Description', N'评论内容',
'SCHEMA', N'dbo',
'TABLE', N'agenda_comment',
'COLUMN', N'comment_content'
GO

EXEC sp_addextendedproperty
'MS_Description', N'点赞数',
'SCHEMA', N'dbo',
'TABLE', N'agenda_comment',
'COLUMN', N'like'
GO

EXEC sp_addextendedproperty
'MS_Description', N'评论时间',
'SCHEMA', N'dbo',
'TABLE', N'agenda_comment',
'COLUMN', N'comment_time'
GO

EXEC sp_addextendedproperty
'MS_Description', N'1为评论区，2为弹幕',
'SCHEMA', N'dbo',
'TABLE', N'agenda_comment',
'COLUMN', N'comment_type'
GO


-- ----------------------------
-- Records of agenda_comment
-- ----------------------------
SET IDENTITY_INSERT [dbo].[agenda_comment] ON
GO

INSERT INTO [dbo].[agenda_comment] ([agenda_comment_id], [agenda_id], [user_id], [comment_content], [like], [comment_time], [comment_type]) VALUES (N'1', N'1', N'1', N'1', N'0', N'2024-03-04 23:55:58.223', N'2')
GO

INSERT INTO [dbo].[agenda_comment] ([agenda_comment_id], [agenda_id], [user_id], [comment_content], [like], [comment_time], [comment_type]) VALUES (N'2', N'1', N'1', N'这是在讲什么？', N'0', N'2024-03-04 23:56:18.583', N'2')
GO

INSERT INTO [dbo].[agenda_comment] ([agenda_comment_id], [agenda_id], [user_id], [comment_content], [like], [comment_time], [comment_type]) VALUES (N'3', N'1', N'1', N'啊哦？', N'0', N'2024-03-04 23:56:37.217', N'2')
GO

INSERT INTO [dbo].[agenda_comment] ([agenda_comment_id], [agenda_id], [user_id], [comment_content], [like], [comment_time], [comment_type]) VALUES (N'4', N'1', N'1', N'欢迎大家！', N'0', N'2024-03-05 15:50:39.590', N'2')
GO

INSERT INTO [dbo].[agenda_comment] ([agenda_comment_id], [agenda_id], [user_id], [comment_content], [like], [comment_time], [comment_type]) VALUES (N'5', N'1', N'1', N'这是在讲什么', N'0', N'2024-03-05 15:50:57.070', N'2')
GO

INSERT INTO [dbo].[agenda_comment] ([agenda_comment_id], [agenda_id], [user_id], [comment_content], [like], [comment_time], [comment_type]) VALUES (N'6', N'1', N'1', N'1', N'0', N'2024-03-05 15:51:12.517', N'2')
GO

SET IDENTITY_INSERT [dbo].[agenda_comment] OFF
GO


-- ----------------------------
-- Table structure for agenda_sub
-- ----------------------------
IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[agenda_sub]') AND type IN ('U'))
	DROP TABLE [dbo].[agenda_sub]
GO

CREATE TABLE [dbo].[agenda_sub] (
  [agenda_sub_id] int  IDENTITY(1,1) NOT NULL,
  [agenda_id] int  NOT NULL,
  [user_id] int  NOT NULL,
  [subscription_time] datetime  NULL
)
GO

ALTER TABLE [dbo].[agenda_sub] SET (LOCK_ESCALATION = TABLE)
GO

EXEC sp_addextendedproperty
'MS_Description', N'订阅ID',
'SCHEMA', N'dbo',
'TABLE', N'agenda_sub',
'COLUMN', N'agenda_sub_id'
GO

EXEC sp_addextendedproperty
'MS_Description', N'议程ID',
'SCHEMA', N'dbo',
'TABLE', N'agenda_sub',
'COLUMN', N'agenda_id'
GO

EXEC sp_addextendedproperty
'MS_Description', N'用户ID',
'SCHEMA', N'dbo',
'TABLE', N'agenda_sub',
'COLUMN', N'user_id'
GO

EXEC sp_addextendedproperty
'MS_Description', N'订阅时间',
'SCHEMA', N'dbo',
'TABLE', N'agenda_sub',
'COLUMN', N'subscription_time'
GO


-- ----------------------------
-- Records of agenda_sub
-- ----------------------------
SET IDENTITY_INSERT [dbo].[agenda_sub] ON
GO

SET IDENTITY_INSERT [dbo].[agenda_sub] OFF
GO


-- ----------------------------
-- Table structure for download
-- ----------------------------
IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[download]') AND type IN ('U'))
	DROP TABLE [dbo].[download]
GO

CREATE TABLE [dbo].[download] (
  [download_id] int  IDENTITY(1,1) NOT NULL,
  [download_name] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [download_link] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [activity_id] int  NOT NULL
)
GO

ALTER TABLE [dbo].[download] SET (LOCK_ESCALATION = TABLE)
GO

EXEC sp_addextendedproperty
'MS_Description', N'下载id',
'SCHEMA', N'dbo',
'TABLE', N'download',
'COLUMN', N'download_id'
GO

EXEC sp_addextendedproperty
'MS_Description', N'资料名称',
'SCHEMA', N'dbo',
'TABLE', N'download',
'COLUMN', N'download_name'
GO

EXEC sp_addextendedproperty
'MS_Description', N'下载链接',
'SCHEMA', N'dbo',
'TABLE', N'download',
'COLUMN', N'download_link'
GO

EXEC sp_addextendedproperty
'MS_Description', N'活动id',
'SCHEMA', N'dbo',
'TABLE', N'download',
'COLUMN', N'activity_id'
GO


-- ----------------------------
-- Records of download
-- ----------------------------
SET IDENTITY_INSERT [dbo].[download] ON
GO

SET IDENTITY_INSERT [dbo].[download] OFF
GO


-- ----------------------------
-- Table structure for exhibitor
-- ----------------------------
IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[exhibitor]') AND type IN ('U'))
	DROP TABLE [dbo].[exhibitor]
GO

CREATE TABLE [dbo].[exhibitor] (
  [exhibitor_id] int  IDENTITY(1,1) NOT NULL,
  [brand] varchar(30) COLLATE Chinese_PRC_CI_AS  NOT NULL,
  [logo_link] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [video_link] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [news_link1] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [news_link2] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [news_link3] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [product_info] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [create_time] datetime  NULL,
  [update_time] datetime  NULL
)
GO

ALTER TABLE [dbo].[exhibitor] SET (LOCK_ESCALATION = TABLE)
GO

EXEC sp_addextendedproperty
'MS_Description', N'展商ID',
'SCHEMA', N'dbo',
'TABLE', N'exhibitor',
'COLUMN', N'exhibitor_id'
GO

EXEC sp_addextendedproperty
'MS_Description', N'品牌名',
'SCHEMA', N'dbo',
'TABLE', N'exhibitor',
'COLUMN', N'brand'
GO

EXEC sp_addextendedproperty
'MS_Description', N'logo链接',
'SCHEMA', N'dbo',
'TABLE', N'exhibitor',
'COLUMN', N'logo_link'
GO

EXEC sp_addextendedproperty
'MS_Description', N'视频链接',
'SCHEMA', N'dbo',
'TABLE', N'exhibitor',
'COLUMN', N'video_link'
GO

EXEC sp_addextendedproperty
'MS_Description', N'海报链接1',
'SCHEMA', N'dbo',
'TABLE', N'exhibitor',
'COLUMN', N'news_link1'
GO

EXEC sp_addextendedproperty
'MS_Description', N'海报链接2',
'SCHEMA', N'dbo',
'TABLE', N'exhibitor',
'COLUMN', N'news_link2'
GO

EXEC sp_addextendedproperty
'MS_Description', N'海报链接3',
'SCHEMA', N'dbo',
'TABLE', N'exhibitor',
'COLUMN', N'news_link3'
GO

EXEC sp_addextendedproperty
'MS_Description', N'展商简介',
'SCHEMA', N'dbo',
'TABLE', N'exhibitor',
'COLUMN', N'product_info'
GO

EXEC sp_addextendedproperty
'MS_Description', N'创建时间',
'SCHEMA', N'dbo',
'TABLE', N'exhibitor',
'COLUMN', N'create_time'
GO

EXEC sp_addextendedproperty
'MS_Description', N'更新时间',
'SCHEMA', N'dbo',
'TABLE', N'exhibitor',
'COLUMN', N'update_time'
GO


-- ----------------------------
-- Records of exhibitor
-- ----------------------------
SET IDENTITY_INSERT [dbo].[exhibitor] ON
GO

SET IDENTITY_INSERT [dbo].[exhibitor] OFF
GO


-- ----------------------------
-- Table structure for expert
-- ----------------------------
IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[expert]') AND type IN ('U'))
	DROP TABLE [dbo].[expert]
GO

CREATE TABLE [dbo].[expert] (
  [expert_id] int  IDENTITY(1,1) NOT NULL,
  [expert_name] varchar(30) COLLATE Chinese_PRC_CI_AS  NOT NULL,
  [expert_content] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [expert_img] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL
)
GO

ALTER TABLE [dbo].[expert] SET (LOCK_ESCALATION = TABLE)
GO

EXEC sp_addextendedproperty
'MS_Description', N'专家ID
',
'SCHEMA', N'dbo',
'TABLE', N'expert',
'COLUMN', N'expert_id'
GO

EXEC sp_addextendedproperty
'MS_Description', N'专家姓名',
'SCHEMA', N'dbo',
'TABLE', N'expert',
'COLUMN', N'expert_name'
GO

EXEC sp_addextendedproperty
'MS_Description', N'身份介绍',
'SCHEMA', N'dbo',
'TABLE', N'expert',
'COLUMN', N'expert_content'
GO

EXEC sp_addextendedproperty
'MS_Description', N'专家人像',
'SCHEMA', N'dbo',
'TABLE', N'expert',
'COLUMN', N'expert_img'
GO


-- ----------------------------
-- Records of expert
-- ----------------------------
SET IDENTITY_INSERT [dbo].[expert] ON
GO

INSERT INTO [dbo].[expert] ([expert_id], [expert_name], [expert_content], [expert_img]) VALUES (N'1', N'梁文杰', N'中国科学院物理研究所研究员，中国科学院大学聘任教授', NULL)
GO

INSERT INTO [dbo].[expert] ([expert_id], [expert_name], [expert_content], [expert_img]) VALUES (N'2', N'
赵云鹏', N'浙江大学生命科学学院教授、副院长', NULL)
GO

INSERT INTO [dbo].[expert] ([expert_id], [expert_name], [expert_content], [expert_img]) VALUES (N'3', N'张玉成', N'中国科学院计算技术研究所正高级工程师', NULL)
GO

INSERT INTO [dbo].[expert] ([expert_id], [expert_name], [expert_content], [expert_img]) VALUES (N'4', N'
徐飞虎', N'中国科学技术大学教授', NULL)
GO

INSERT INTO [dbo].[expert] ([expert_id], [expert_name], [expert_content], [expert_img]) VALUES (N'5', N'宗成庆', N'中国科学院自动化研究所研究员', NULL)
GO

INSERT INTO [dbo].[expert] ([expert_id], [expert_name], [expert_content], [expert_img]) VALUES (N'6', N'
于朕', N'中国美术学院创新设计学院副教授', NULL)
GO

INSERT INTO [dbo].[expert] ([expert_id], [expert_name], [expert_content], [expert_img]) VALUES (N'7', N'安通鉴', N'安恒信息启鉴实验室主任', NULL)
GO

SET IDENTITY_INSERT [dbo].[expert] OFF
GO


-- ----------------------------
-- Table structure for flow
-- ----------------------------
IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[flow]') AND type IN ('U'))
	DROP TABLE [dbo].[flow]
GO

CREATE TABLE [dbo].[flow] (
  [flow_id] int  IDENTITY(1,1) NOT NULL,
  [activity_id] int  NOT NULL,
  [flow_starttime] time(7)  NULL,
  [flow_endtime] time(7)  NULL,
  [flow_content] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [flow_location] varchar(100) COLLATE Chinese_PRC_CI_AS  NULL,
  [speaker_id1] int  NULL,
  [speaker_id2] int  NULL,
  [speaker_id3] int  NULL
)
GO

ALTER TABLE [dbo].[flow] SET (LOCK_ESCALATION = TABLE)
GO

EXEC sp_addextendedproperty
'MS_Description', N'流程ID',
'SCHEMA', N'dbo',
'TABLE', N'flow',
'COLUMN', N'flow_id'
GO

EXEC sp_addextendedproperty
'MS_Description', N'活动ID，外键',
'SCHEMA', N'dbo',
'TABLE', N'flow',
'COLUMN', N'activity_id'
GO

EXEC sp_addextendedproperty
'MS_Description', N'记录活动流程开始发生时间',
'SCHEMA', N'dbo',
'TABLE', N'flow',
'COLUMN', N'flow_starttime'
GO

EXEC sp_addextendedproperty
'MS_Description', N'记录活动流程结束时间',
'SCHEMA', N'dbo',
'TABLE', N'flow',
'COLUMN', N'flow_endtime'
GO

EXEC sp_addextendedproperty
'MS_Description', N'描述具体的流程活动，比如 "准备阶段"、"开场致辞"、"主题演讲"、"分组讨论" 等',
'SCHEMA', N'dbo',
'TABLE', N'flow',
'COLUMN', N'flow_content'
GO

EXEC sp_addextendedproperty
'MS_Description', N'流程活动发生地点',
'SCHEMA', N'dbo',
'TABLE', N'flow',
'COLUMN', N'flow_location'
GO

EXEC sp_addextendedproperty
'MS_Description', N'主讲人id1',
'SCHEMA', N'dbo',
'TABLE', N'flow',
'COLUMN', N'speaker_id1'
GO

EXEC sp_addextendedproperty
'MS_Description', N'主讲人id2',
'SCHEMA', N'dbo',
'TABLE', N'flow',
'COLUMN', N'speaker_id2'
GO

EXEC sp_addextendedproperty
'MS_Description', N'主讲人id3',
'SCHEMA', N'dbo',
'TABLE', N'flow',
'COLUMN', N'speaker_id3'
GO


-- ----------------------------
-- Records of flow
-- ----------------------------
SET IDENTITY_INSERT [dbo].[flow] ON
GO

INSERT INTO [dbo].[flow] ([flow_id], [activity_id], [flow_starttime], [flow_endtime], [flow_content], [flow_location], [speaker_id1], [speaker_id2], [speaker_id3]) VALUES (N'1', N'1', N'18:00:00.0000000', N'18:05:00.0000000', N'主持人致辞', NULL, NULL, NULL, NULL)
GO

INSERT INTO [dbo].[flow] ([flow_id], [activity_id], [flow_starttime], [flow_endtime], [flow_content], [flow_location], [speaker_id1], [speaker_id2], [speaker_id3]) VALUES (N'2', N'1', N'18:05:00.0000000', N'18:25:00.0000000', N'幻想一定是不科学的，但我们都爱她', NULL, N'1', NULL, NULL)
GO

INSERT INTO [dbo].[flow] ([flow_id], [activity_id], [flow_starttime], [flow_endtime], [flow_content], [flow_location], [speaker_id1], [speaker_id2], [speaker_id3]) VALUES (N'3', N'1', N'18:25:00.0000000', N'18:45:00.0000000', N'银杏，熟悉的陌生树', NULL, N'2', NULL, NULL)
GO

INSERT INTO [dbo].[flow] ([flow_id], [activity_id], [flow_starttime], [flow_endtime], [flow_content], [flow_location], [speaker_id1], [speaker_id2], [speaker_id3]) VALUES (N'4', N'1', N'18:45:00.0000000', N'19:05:00.0000000', N'种地不苦，还能很酷', NULL, N'3', NULL, NULL)
GO

INSERT INTO [dbo].[flow] ([flow_id], [activity_id], [flow_starttime], [flow_endtime], [flow_content], [flow_location], [speaker_id1], [speaker_id2], [speaker_id3]) VALUES (N'5', N'1', N'19:05:00.0000000', N'19:25:00.0000000', N'成像秘技之隔墙观物', NULL, N'4', NULL, NULL)
GO

INSERT INTO [dbo].[flow] ([flow_id], [activity_id], [flow_starttime], [flow_endtime], [flow_content], [flow_location], [speaker_id1], [speaker_id2], [speaker_id3]) VALUES (N'6', N'1', N'19:25:00.0000000', N'19:45:00.0000000', N'大语言模型让我们更聪明还是更愚蠢？', NULL, N'5', NULL, NULL)
GO

INSERT INTO [dbo].[flow] ([flow_id], [activity_id], [flow_starttime], [flow_endtime], [flow_content], [flow_location], [speaker_id1], [speaker_id2], [speaker_id3]) VALUES (N'7', N'1', N'19:45:00.0000000', N'20:05:00.0000000', N'可能世界档案', NULL, N'6', NULL, NULL)
GO

INSERT INTO [dbo].[flow] ([flow_id], [activity_id], [flow_starttime], [flow_endtime], [flow_content], [flow_location], [speaker_id1], [speaker_id2], [speaker_id3]) VALUES (N'8', N'1', N'20:05:00.0000000', N'20:35:00.0000000', N'圆桌论坛：我们会被AI替代吗？', NULL, N'1', N'2', N'3')
GO

INSERT INTO [dbo].[flow] ([flow_id], [activity_id], [flow_starttime], [flow_endtime], [flow_content], [flow_location], [speaker_id1], [speaker_id2], [speaker_id3]) VALUES (N'9', N'2', N'10:00:00.0000000', N'10:30:00.0000000', N'召集95后“守门人”的苦辣酸甜，共赴一场新时代极客青年talk', NULL, NULL, NULL, NULL)
GO

SET IDENTITY_INSERT [dbo].[flow] OFF
GO


-- ----------------------------
-- Table structure for information
-- ----------------------------
IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[information]') AND type IN ('U'))
	DROP TABLE [dbo].[information]
GO

CREATE TABLE [dbo].[information] (
  [information_id] int  IDENTITY(1,1) NOT NULL,
  [type] tinyint  NULL,
  [information_title] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [information_content] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [news_url] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [click_num] int DEFAULT 0 NULL,
  [publish_time] datetime  NULL,
  [create_time] datetime  NULL,
  [update_time] datetime  NULL,
  [thumb_num] int DEFAULT 0 NULL
)
GO

ALTER TABLE [dbo].[information] SET (LOCK_ESCALATION = TABLE)
GO

EXEC sp_addextendedproperty
'MS_Description', N'资讯ID',
'SCHEMA', N'dbo',
'TABLE', N'information',
'COLUMN', N'information_id'
GO

EXEC sp_addextendedproperty
'MS_Description', N'1为图片，2为视频',
'SCHEMA', N'dbo',
'TABLE', N'information',
'COLUMN', N'type'
GO

EXEC sp_addextendedproperty
'MS_Description', N'资讯标题',
'SCHEMA', N'dbo',
'TABLE', N'information',
'COLUMN', N'information_title'
GO

EXEC sp_addextendedproperty
'MS_Description', N'资讯内容',
'SCHEMA', N'dbo',
'TABLE', N'information',
'COLUMN', N'information_content'
GO

EXEC sp_addextendedproperty
'MS_Description', N'资讯地址',
'SCHEMA', N'dbo',
'TABLE', N'information',
'COLUMN', N'news_url'
GO

EXEC sp_addextendedproperty
'MS_Description', N'点击人数',
'SCHEMA', N'dbo',
'TABLE', N'information',
'COLUMN', N'click_num'
GO

EXEC sp_addextendedproperty
'MS_Description', N'发布时间',
'SCHEMA', N'dbo',
'TABLE', N'information',
'COLUMN', N'publish_time'
GO

EXEC sp_addextendedproperty
'MS_Description', N'创建时间',
'SCHEMA', N'dbo',
'TABLE', N'information',
'COLUMN', N'create_time'
GO

EXEC sp_addextendedproperty
'MS_Description', N'更新时间',
'SCHEMA', N'dbo',
'TABLE', N'information',
'COLUMN', N'update_time'
GO

EXEC sp_addextendedproperty
'MS_Description', N'点赞量',
'SCHEMA', N'dbo',
'TABLE', N'information',
'COLUMN', N'thumb_num'
GO


-- ----------------------------
-- Records of information
-- ----------------------------
SET IDENTITY_INSERT [dbo].[information] ON
GO

SET IDENTITY_INSERT [dbo].[information] OFF
GO


-- ----------------------------
-- Table structure for luckydraw
-- ----------------------------
IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[luckydraw]') AND type IN ('U'))
	DROP TABLE [dbo].[luckydraw]
GO

CREATE TABLE [dbo].[luckydraw] (
  [luckydraw_id] int  IDENTITY(1,1) NOT NULL,
  [activity_id] int  NOT NULL,
  [end_time] datetime  NULL,
  [begin_time] datetime  NULL
)
GO

ALTER TABLE [dbo].[luckydraw] SET (LOCK_ESCALATION = TABLE)
GO

EXEC sp_addextendedproperty
'MS_Description', N'抽奖活动ID',
'SCHEMA', N'dbo',
'TABLE', N'luckydraw',
'COLUMN', N'luckydraw_id'
GO

EXEC sp_addextendedproperty
'MS_Description', N'活动ID',
'SCHEMA', N'dbo',
'TABLE', N'luckydraw',
'COLUMN', N'activity_id'
GO

EXEC sp_addextendedproperty
'MS_Description', N'活动抽奖截止时间',
'SCHEMA', N'dbo',
'TABLE', N'luckydraw',
'COLUMN', N'end_time'
GO

EXEC sp_addextendedproperty
'MS_Description', N'活动抽奖开始时间',
'SCHEMA', N'dbo',
'TABLE', N'luckydraw',
'COLUMN', N'begin_time'
GO


-- ----------------------------
-- Records of luckydraw
-- ----------------------------
SET IDENTITY_INSERT [dbo].[luckydraw] ON
GO

SET IDENTITY_INSERT [dbo].[luckydraw] OFF
GO


-- ----------------------------
-- Table structure for passage
-- ----------------------------
IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[passage]') AND type IN ('U'))
	DROP TABLE [dbo].[passage]
GO

CREATE TABLE [dbo].[passage] (
  [passage_id] int  IDENTITY(1,1) NOT NULL,
  [title] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [context] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [author] int  NULL,
  [publish_time] datetime DEFAULT 0 NULL,
  [likes] int  NULL,
  [counts] int  NULL,
  [state] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL
)
GO

ALTER TABLE [dbo].[passage] SET (LOCK_ESCALATION = TABLE)
GO

EXEC sp_addextendedproperty
'MS_Description', N'论坛文章表id',
'SCHEMA', N'dbo',
'TABLE', N'passage',
'COLUMN', N'passage_id'
GO

EXEC sp_addextendedproperty
'MS_Description', N'标题',
'SCHEMA', N'dbo',
'TABLE', N'passage',
'COLUMN', N'title'
GO

EXEC sp_addextendedproperty
'MS_Description', N'内容',
'SCHEMA', N'dbo',
'TABLE', N'passage',
'COLUMN', N'context'
GO

EXEC sp_addextendedproperty
'MS_Description', N'作者id',
'SCHEMA', N'dbo',
'TABLE', N'passage',
'COLUMN', N'author'
GO

EXEC sp_addextendedproperty
'MS_Description', N'发布时间',
'SCHEMA', N'dbo',
'TABLE', N'passage',
'COLUMN', N'publish_time'
GO

EXEC sp_addextendedproperty
'MS_Description', N'点赞量',
'SCHEMA', N'dbo',
'TABLE', N'passage',
'COLUMN', N'likes'
GO

EXEC sp_addextendedproperty
'MS_Description', N'浏览量',
'SCHEMA', N'dbo',
'TABLE', N'passage',
'COLUMN', N'counts'
GO

EXEC sp_addextendedproperty
'MS_Description', N'”0“---违规   “1”---人工复审     ”2“----通过',
'SCHEMA', N'dbo',
'TABLE', N'passage',
'COLUMN', N'state'
GO


-- ----------------------------
-- Records of passage
-- ----------------------------
SET IDENTITY_INSERT [dbo].[passage] ON
GO

SET IDENTITY_INSERT [dbo].[passage] OFF
GO


-- ----------------------------
-- Table structure for passage_comment
-- ----------------------------
IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[passage_comment]') AND type IN ('U'))
	DROP TABLE [dbo].[passage_comment]
GO

CREATE TABLE [dbo].[passage_comment] (
  [passage_comment_id] int  IDENTITY(1,1) NOT NULL,
  [passage_id] int  NULL,
  [parent_id] int  NULL,
  [author] int  NULL,
  [content] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [publish_time] datetime  NULL
)
GO

ALTER TABLE [dbo].[passage_comment] SET (LOCK_ESCALATION = TABLE)
GO

EXEC sp_addextendedproperty
'MS_Description', N'论坛评论表主键id',
'SCHEMA', N'dbo',
'TABLE', N'passage_comment',
'COLUMN', N'passage_comment_id'
GO

EXEC sp_addextendedproperty
'MS_Description', N'文章id',
'SCHEMA', N'dbo',
'TABLE', N'passage_comment',
'COLUMN', N'passage_id'
GO

EXEC sp_addextendedproperty
'MS_Description', N'父级id',
'SCHEMA', N'dbo',
'TABLE', N'passage_comment',
'COLUMN', N'parent_id'
GO

EXEC sp_addextendedproperty
'MS_Description', N'作者id',
'SCHEMA', N'dbo',
'TABLE', N'passage_comment',
'COLUMN', N'author'
GO

EXEC sp_addextendedproperty
'MS_Description', N'内容',
'SCHEMA', N'dbo',
'TABLE', N'passage_comment',
'COLUMN', N'content'
GO

EXEC sp_addextendedproperty
'MS_Description', N'发布时间',
'SCHEMA', N'dbo',
'TABLE', N'passage_comment',
'COLUMN', N'publish_time'
GO


-- ----------------------------
-- Records of passage_comment
-- ----------------------------
SET IDENTITY_INSERT [dbo].[passage_comment] ON
GO

SET IDENTITY_INSERT [dbo].[passage_comment] OFF
GO


-- ----------------------------
-- Table structure for passage_count
-- ----------------------------
IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[passage_count]') AND type IN ('U'))
	DROP TABLE [dbo].[passage_count]
GO

CREATE TABLE [dbo].[passage_count] (
  [passage_count_id] int  IDENTITY(1,1) NOT NULL,
  [user_id] int  NULL,
  [passage_id] int  NULL,
  [count_time] datetime  NULL
)
GO

ALTER TABLE [dbo].[passage_count] SET (LOCK_ESCALATION = TABLE)
GO

EXEC sp_addextendedproperty
'MS_Description', N'论坛浏览表',
'SCHEMA', N'dbo',
'TABLE', N'passage_count',
'COLUMN', N'passage_count_id'
GO

EXEC sp_addextendedproperty
'MS_Description', N'用户id',
'SCHEMA', N'dbo',
'TABLE', N'passage_count',
'COLUMN', N'user_id'
GO

EXEC sp_addextendedproperty
'MS_Description', N'文章id',
'SCHEMA', N'dbo',
'TABLE', N'passage_count',
'COLUMN', N'passage_id'
GO

EXEC sp_addextendedproperty
'MS_Description', N'时间',
'SCHEMA', N'dbo',
'TABLE', N'passage_count',
'COLUMN', N'count_time'
GO


-- ----------------------------
-- Records of passage_count
-- ----------------------------
SET IDENTITY_INSERT [dbo].[passage_count] ON
GO

SET IDENTITY_INSERT [dbo].[passage_count] OFF
GO


-- ----------------------------
-- Table structure for passage_like
-- ----------------------------
IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[passage_like]') AND type IN ('U'))
	DROP TABLE [dbo].[passage_like]
GO

CREATE TABLE [dbo].[passage_like] (
  [passage_like_id] int  IDENTITY(1,1) NOT NULL,
  [passage_id] int  NULL,
  [user_id] int  NULL,
  [like_time] datetime  NULL
)
GO

ALTER TABLE [dbo].[passage_like] SET (LOCK_ESCALATION = TABLE)
GO

EXEC sp_addextendedproperty
'MS_Description', N'论坛点赞表',
'SCHEMA', N'dbo',
'TABLE', N'passage_like',
'COLUMN', N'passage_like_id'
GO

EXEC sp_addextendedproperty
'MS_Description', N'文章id',
'SCHEMA', N'dbo',
'TABLE', N'passage_like',
'COLUMN', N'passage_id'
GO

EXEC sp_addextendedproperty
'MS_Description', N'点赞人id',
'SCHEMA', N'dbo',
'TABLE', N'passage_like',
'COLUMN', N'user_id'
GO

EXEC sp_addextendedproperty
'MS_Description', N'点赞时间',
'SCHEMA', N'dbo',
'TABLE', N'passage_like',
'COLUMN', N'like_time'
GO


-- ----------------------------
-- Records of passage_like
-- ----------------------------
SET IDENTITY_INSERT [dbo].[passage_like] ON
GO

SET IDENTITY_INSERT [dbo].[passage_like] OFF
GO


-- ----------------------------
-- Table structure for payment
-- ----------------------------
IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[payment]') AND type IN ('U'))
	DROP TABLE [dbo].[payment]
GO

CREATE TABLE [dbo].[payment] (
  [payment_id] int  IDENTITY(1,1) NOT NULL,
  [user_id] int  NOT NULL,
  [activity_id] int  NOT NULL,
  [payment_time] datetime  NULL,
  [amount] float(53)  NULL,
  [status] tinyint DEFAULT 0 NOT NULL,
  [create_time] datetime  NULL,
  [update_time] datetime  NULL
)
GO

ALTER TABLE [dbo].[payment] SET (LOCK_ESCALATION = TABLE)
GO

EXEC sp_addextendedproperty
'MS_Description', N'支付id',
'SCHEMA', N'dbo',
'TABLE', N'payment',
'COLUMN', N'payment_id'
GO

EXEC sp_addextendedproperty
'MS_Description', N'用户id',
'SCHEMA', N'dbo',
'TABLE', N'payment',
'COLUMN', N'user_id'
GO

EXEC sp_addextendedproperty
'MS_Description', N'活动id',
'SCHEMA', N'dbo',
'TABLE', N'payment',
'COLUMN', N'activity_id'
GO

EXEC sp_addextendedproperty
'MS_Description', N'支付时间',
'SCHEMA', N'dbo',
'TABLE', N'payment',
'COLUMN', N'payment_time'
GO

EXEC sp_addextendedproperty
'MS_Description', N'支付金额',
'SCHEMA', N'dbo',
'TABLE', N'payment',
'COLUMN', N'amount'
GO

EXEC sp_addextendedproperty
'MS_Description', N'订单的状态，1、未付款 2、已付款 3、交易取消，订单关闭 ',
'SCHEMA', N'dbo',
'TABLE', N'payment',
'COLUMN', N'status'
GO

EXEC sp_addextendedproperty
'MS_Description', N'创建时间',
'SCHEMA', N'dbo',
'TABLE', N'payment',
'COLUMN', N'create_time'
GO

EXEC sp_addextendedproperty
'MS_Description', N'更新时间',
'SCHEMA', N'dbo',
'TABLE', N'payment',
'COLUMN', N'update_time'
GO


-- ----------------------------
-- Records of payment
-- ----------------------------
SET IDENTITY_INSERT [dbo].[payment] ON
GO

SET IDENTITY_INSERT [dbo].[payment] OFF
GO


-- ----------------------------
-- Table structure for point_detail
-- ----------------------------
IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[point_detail]') AND type IN ('U'))
	DROP TABLE [dbo].[point_detail]
GO

CREATE TABLE [dbo].[point_detail] (
  [point_detail_id] int  IDENTITY(1,1) NOT NULL,
  [user_id] int  NOT NULL,
  [point_rule_id] int  NOT NULL,
  [point_num] int  NULL,
  [time] datetime  NULL
)
GO

ALTER TABLE [dbo].[point_detail] SET (LOCK_ESCALATION = TABLE)
GO

EXEC sp_addextendedproperty
'MS_Description', N'具体明细id',
'SCHEMA', N'dbo',
'TABLE', N'point_detail',
'COLUMN', N'point_detail_id'
GO

EXEC sp_addextendedproperty
'MS_Description', N'用户id',
'SCHEMA', N'dbo',
'TABLE', N'point_detail',
'COLUMN', N'user_id'
GO

EXEC sp_addextendedproperty
'MS_Description', N'积分规则id',
'SCHEMA', N'dbo',
'TABLE', N'point_detail',
'COLUMN', N'point_rule_id'
GO

EXEC sp_addextendedproperty
'MS_Description', N'积分数值',
'SCHEMA', N'dbo',
'TABLE', N'point_detail',
'COLUMN', N'point_num'
GO

EXEC sp_addextendedproperty
'MS_Description', N'获取积分时间',
'SCHEMA', N'dbo',
'TABLE', N'point_detail',
'COLUMN', N'time'
GO


-- ----------------------------
-- Records of point_detail
-- ----------------------------
SET IDENTITY_INSERT [dbo].[point_detail] ON
GO

SET IDENTITY_INSERT [dbo].[point_detail] OFF
GO


-- ----------------------------
-- Table structure for point_prize
-- ----------------------------
IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[point_prize]') AND type IN ('U'))
	DROP TABLE [dbo].[point_prize]
GO

CREATE TABLE [dbo].[point_prize] (
  [point_prize_id] int  IDENTITY(1,1) NOT NULL,
  [prize_name] varchar(50) COLLATE Chinese_PRC_CI_AS  NULL,
  [prize_detail] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [exchange_point_num] int  NULL,
  [prize_img] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [prize_num] int  NULL
)
GO

ALTER TABLE [dbo].[point_prize] SET (LOCK_ESCALATION = TABLE)
GO

EXEC sp_addextendedproperty
'MS_Description', N'积分奖品id',
'SCHEMA', N'dbo',
'TABLE', N'point_prize',
'COLUMN', N'point_prize_id'
GO

EXEC sp_addextendedproperty
'MS_Description', N'奖品名',
'SCHEMA', N'dbo',
'TABLE', N'point_prize',
'COLUMN', N'prize_name'
GO

EXEC sp_addextendedproperty
'MS_Description', N'奖品详细',
'SCHEMA', N'dbo',
'TABLE', N'point_prize',
'COLUMN', N'prize_detail'
GO

EXEC sp_addextendedproperty
'MS_Description', N'兑换积分',
'SCHEMA', N'dbo',
'TABLE', N'point_prize',
'COLUMN', N'exchange_point_num'
GO

EXEC sp_addextendedproperty
'MS_Description', N'奖品图片',
'SCHEMA', N'dbo',
'TABLE', N'point_prize',
'COLUMN', N'prize_img'
GO

EXEC sp_addextendedproperty
'MS_Description', N'库存',
'SCHEMA', N'dbo',
'TABLE', N'point_prize',
'COLUMN', N'prize_num'
GO


-- ----------------------------
-- Records of point_prize
-- ----------------------------
SET IDENTITY_INSERT [dbo].[point_prize] ON
GO

SET IDENTITY_INSERT [dbo].[point_prize] OFF
GO


-- ----------------------------
-- Table structure for point_rule
-- ----------------------------
IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[point_rule]') AND type IN ('U'))
	DROP TABLE [dbo].[point_rule]
GO

CREATE TABLE [dbo].[point_rule] (
  [point_rule_id] int  IDENTITY(1,1) NOT NULL,
  [point_rule_name] varchar(50) COLLATE Chinese_PRC_CI_AS  NULL,
  [point_num] int  NULL,
  [is_reset] tinyint  NULL,
  [is_reset_exchange] tinyint DEFAULT 0 NULL,
  [introduce] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [beforeResetTime] datetime  NULL,
  [reset_time] bigint  NULL
)
GO

ALTER TABLE [dbo].[point_rule] SET (LOCK_ESCALATION = TABLE)
GO

EXEC sp_addextendedproperty
'MS_Description', N'积分规则id',
'SCHEMA', N'dbo',
'TABLE', N'point_rule',
'COLUMN', N'point_rule_id'
GO

EXEC sp_addextendedproperty
'MS_Description', N'积分规则名，如：每日签到',
'SCHEMA', N'dbo',
'TABLE', N'point_rule',
'COLUMN', N'point_rule_name'
GO

EXEC sp_addextendedproperty
'MS_Description', N'积分数值，如：200，加两百',
'SCHEMA', N'dbo',
'TABLE', N'point_rule',
'COLUMN', N'point_num'
GO

EXEC sp_addextendedproperty
'MS_Description', N'是否重置，0为不可，如注册登录+200，1为可重置，如每日登录+50',
'SCHEMA', N'dbo',
'TABLE', N'point_rule',
'COLUMN', N'is_reset'
GO

EXEC sp_addextendedproperty
'MS_Description', N'是否可以重复兑换,0为否，1为可以，默认0',
'SCHEMA', N'dbo',
'TABLE', N'point_rule',
'COLUMN', N'is_reset_exchange'
GO

EXEC sp_addextendedproperty
'MS_Description', N'介绍',
'SCHEMA', N'dbo',
'TABLE', N'point_rule',
'COLUMN', N'introduce'
GO

EXEC sp_addextendedproperty
'MS_Description', N'上一次重置时间',
'SCHEMA', N'dbo',
'TABLE', N'point_rule',
'COLUMN', N'beforeResetTime'
GO

EXEC sp_addextendedproperty
'MS_Description', N'重置时间，每天重置即为24',
'SCHEMA', N'dbo',
'TABLE', N'point_rule',
'COLUMN', N'reset_time'
GO


-- ----------------------------
-- Records of point_rule
-- ----------------------------
SET IDENTITY_INSERT [dbo].[point_rule] ON
GO

SET IDENTITY_INSERT [dbo].[point_rule] OFF
GO


-- ----------------------------
-- Table structure for registration
-- ----------------------------
IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[registration]') AND type IN ('U'))
	DROP TABLE [dbo].[registration]
GO

CREATE TABLE [dbo].[registration] (
  [registration_id] int  IDENTITY(1,1) NOT NULL,
  [activity_id] int  NOT NULL,
  [user_id] int  NOT NULL,
  [registration_time] date  NULL,
  [registration_channel] varchar(20) COLLATE Chinese_PRC_CI_AS  NULL,
  [create_time] datetime  NULL,
  [update_time] datetime  NULL,
  [channel_source] varchar(20) COLLATE Chinese_PRC_CI_AS  NULL
)
GO

ALTER TABLE [dbo].[registration] SET (LOCK_ESCALATION = TABLE)
GO

EXEC sp_addextendedproperty
'MS_Description', N'报名ID',
'SCHEMA', N'dbo',
'TABLE', N'registration',
'COLUMN', N'registration_id'
GO

EXEC sp_addextendedproperty
'MS_Description', N'活动ID',
'SCHEMA', N'dbo',
'TABLE', N'registration',
'COLUMN', N'activity_id'
GO

EXEC sp_addextendedproperty
'MS_Description', N'用户ID',
'SCHEMA', N'dbo',
'TABLE', N'registration',
'COLUMN', N'user_id'
GO

EXEC sp_addextendedproperty
'MS_Description', N'报名时间',
'SCHEMA', N'dbo',
'TABLE', N'registration',
'COLUMN', N'registration_time'
GO

EXEC sp_addextendedproperty
'MS_Description', N'报名渠道：线上、线下等',
'SCHEMA', N'dbo',
'TABLE', N'registration',
'COLUMN', N'registration_channel'
GO

EXEC sp_addextendedproperty
'MS_Description', N'创建时间',
'SCHEMA', N'dbo',
'TABLE', N'registration',
'COLUMN', N'create_time'
GO

EXEC sp_addextendedproperty
'MS_Description', N'更新时间',
'SCHEMA', N'dbo',
'TABLE', N'registration',
'COLUMN', N'update_time'
GO

EXEC sp_addextendedproperty
'MS_Description', N'渠道来源',
'SCHEMA', N'dbo',
'TABLE', N'registration',
'COLUMN', N'channel_source'
GO


-- ----------------------------
-- Records of registration
-- ----------------------------
SET IDENTITY_INSERT [dbo].[registration] ON
GO

SET IDENTITY_INSERT [dbo].[registration] OFF
GO


-- ----------------------------
-- Table structure for speaker
-- ----------------------------
IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[speaker]') AND type IN ('U'))
	DROP TABLE [dbo].[speaker]
GO

CREATE TABLE [dbo].[speaker] (
  [speaker_id] int  IDENTITY(1,1) NOT NULL,
  [speaker_name] varchar(30) COLLATE Chinese_PRC_CI_AS  NOT NULL,
  [speaker_content] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [speaker_img] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [video_link] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL
)
GO

ALTER TABLE [dbo].[speaker] SET (LOCK_ESCALATION = TABLE)
GO

EXEC sp_addextendedproperty
'MS_Description', N'嘉宾ID',
'SCHEMA', N'dbo',
'TABLE', N'speaker',
'COLUMN', N'speaker_id'
GO

EXEC sp_addextendedproperty
'MS_Description', N'嘉宾姓名',
'SCHEMA', N'dbo',
'TABLE', N'speaker',
'COLUMN', N'speaker_name'
GO

EXEC sp_addextendedproperty
'MS_Description', N'嘉宾身份介绍',
'SCHEMA', N'dbo',
'TABLE', N'speaker',
'COLUMN', N'speaker_content'
GO

EXEC sp_addextendedproperty
'MS_Description', N'嘉宾人像',
'SCHEMA', N'dbo',
'TABLE', N'speaker',
'COLUMN', N'speaker_img'
GO

EXEC sp_addextendedproperty
'MS_Description', N'视频展示',
'SCHEMA', N'dbo',
'TABLE', N'speaker',
'COLUMN', N'video_link'
GO


-- ----------------------------
-- Records of speaker
-- ----------------------------
SET IDENTITY_INSERT [dbo].[speaker] ON
GO

SET IDENTITY_INSERT [dbo].[speaker] OFF
GO


-- ----------------------------
-- Table structure for user_checkin
-- ----------------------------
IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[user_checkin]') AND type IN ('U'))
	DROP TABLE [dbo].[user_checkin]
GO

CREATE TABLE [dbo].[user_checkin] (
  [user_checkin_id] int  IDENTITY(1,1) NOT NULL,
  [activity_checkin_id] int  NOT NULL,
  [user_checkin_time] datetime  NULL,
  [user_id] int  NOT NULL
)
GO

ALTER TABLE [dbo].[user_checkin] SET (LOCK_ESCALATION = TABLE)
GO

EXEC sp_addextendedproperty
'MS_Description', N'用户签到ID',
'SCHEMA', N'dbo',
'TABLE', N'user_checkin',
'COLUMN', N'user_checkin_id'
GO

EXEC sp_addextendedproperty
'MS_Description', N'活动签到id',
'SCHEMA', N'dbo',
'TABLE', N'user_checkin',
'COLUMN', N'activity_checkin_id'
GO

EXEC sp_addextendedproperty
'MS_Description', N'用户签到时间',
'SCHEMA', N'dbo',
'TABLE', N'user_checkin',
'COLUMN', N'user_checkin_time'
GO

EXEC sp_addextendedproperty
'MS_Description', N'用户id',
'SCHEMA', N'dbo',
'TABLE', N'user_checkin',
'COLUMN', N'user_id'
GO


-- ----------------------------
-- Records of user_checkin
-- ----------------------------
SET IDENTITY_INSERT [dbo].[user_checkin] ON
GO

SET IDENTITY_INSERT [dbo].[user_checkin] OFF
GO


-- ----------------------------
-- Table structure for user_info
-- ----------------------------
IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[user_info]') AND type IN ('U'))
	DROP TABLE [dbo].[user_info]
GO

CREATE TABLE [dbo].[user_info] (
  [user_id] int  IDENTITY(1,1) NOT NULL,
  [salt] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [username] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [password] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [company] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [department] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [position] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [email] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [tel] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [user_point_num] tinyint  NULL,
  [statue] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [image] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [registration_time] date  NULL
)
GO

ALTER TABLE [dbo].[user_info] SET (LOCK_ESCALATION = TABLE)
GO

EXEC sp_addextendedproperty
'MS_Description', N'用户id',
'SCHEMA', N'dbo',
'TABLE', N'user_info',
'COLUMN', N'user_id'
GO

EXEC sp_addextendedproperty
'MS_Description', N'盐值',
'SCHEMA', N'dbo',
'TABLE', N'user_info',
'COLUMN', N'salt'
GO

EXEC sp_addextendedproperty
'MS_Description', N'用户名',
'SCHEMA', N'dbo',
'TABLE', N'user_info',
'COLUMN', N'username'
GO

EXEC sp_addextendedproperty
'MS_Description', N'密码',
'SCHEMA', N'dbo',
'TABLE', N'user_info',
'COLUMN', N'password'
GO


-- ----------------------------
-- Records of user_info
-- ----------------------------
SET IDENTITY_INSERT [dbo].[user_info] ON
GO

SET IDENTITY_INSERT [dbo].[user_info] OFF
GO


-- ----------------------------
-- Table structure for user_luckydraw
-- ----------------------------
IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[user_luckydraw]') AND type IN ('U'))
	DROP TABLE [dbo].[user_luckydraw]
GO

CREATE TABLE [dbo].[user_luckydraw] (
  [user_luckydraw_id] int  IDENTITY(1,1) NOT NULL,
  [luckydraw_id] int  NOT NULL,
  [user_id] int  NOT NULL,
  [user_luckydraw_time] datetime  NULL,
  [is_winner] tinyint DEFAULT 0 NULL,
  [prize_id] int  NOT NULL
)
GO

ALTER TABLE [dbo].[user_luckydraw] SET (LOCK_ESCALATION = TABLE)
GO

EXEC sp_addextendedproperty
'MS_Description', N'用户抽奖id',
'SCHEMA', N'dbo',
'TABLE', N'user_luckydraw',
'COLUMN', N'user_luckydraw_id'
GO

EXEC sp_addextendedproperty
'MS_Description', N'抽奖活动id',
'SCHEMA', N'dbo',
'TABLE', N'user_luckydraw',
'COLUMN', N'luckydraw_id'
GO

EXEC sp_addextendedproperty
'MS_Description', N'用户id',
'SCHEMA', N'dbo',
'TABLE', N'user_luckydraw',
'COLUMN', N'user_id'
GO

EXEC sp_addextendedproperty
'MS_Description', N'参与抽奖时间',
'SCHEMA', N'dbo',
'TABLE', N'user_luckydraw',
'COLUMN', N'user_luckydraw_time'
GO

EXEC sp_addextendedproperty
'MS_Description', N'是否中奖',
'SCHEMA', N'dbo',
'TABLE', N'user_luckydraw',
'COLUMN', N'is_winner'
GO

EXEC sp_addextendedproperty
'MS_Description', N'奖品id',
'SCHEMA', N'dbo',
'TABLE', N'user_luckydraw',
'COLUMN', N'prize_id'
GO


-- ----------------------------
-- Records of user_luckydraw
-- ----------------------------
SET IDENTITY_INSERT [dbo].[user_luckydraw] ON
GO

SET IDENTITY_INSERT [dbo].[user_luckydraw] OFF
GO


-- ----------------------------
-- Auto increment value for achievement
-- ----------------------------
DBCC CHECKIDENT ('[dbo].[achievement]', RESEED, 1)
GO


-- ----------------------------
-- Primary Key structure for table achievement
-- ----------------------------
ALTER TABLE [dbo].[achievement] ADD CONSTRAINT [PK__achievem__3C492E836B24F9E3] PRIMARY KEY CLUSTERED ([achievement_id])
WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON)  
ON [PRIMARY]
GO


-- ----------------------------
-- Auto increment value for achievement_try
-- ----------------------------
DBCC CHECKIDENT ('[dbo].[achievement_try]', RESEED, 1)
GO


-- ----------------------------
-- Primary Key structure for table achievement_try
-- ----------------------------
ALTER TABLE [dbo].[achievement_try] ADD CONSTRAINT [PK__achievem__3213E83F4A09F32D] PRIMARY KEY CLUSTERED ([id])
WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON)  
ON [PRIMARY]
GO


-- ----------------------------
-- Auto increment value for activity
-- ----------------------------
DBCC CHECKIDENT ('[dbo].[activity]', RESEED, 1)
GO


-- ----------------------------
-- Primary Key structure for table activity
-- ----------------------------
ALTER TABLE [dbo].[activity] ADD CONSTRAINT [PK__activity__482FBD63CE772B90] PRIMARY KEY CLUSTERED ([activity_id])
WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON)  
ON [PRIMARY]
GO


-- ----------------------------
-- Auto increment value for activity_checkin
-- ----------------------------
DBCC CHECKIDENT ('[dbo].[activity_checkin]', RESEED, 1)
GO


-- ----------------------------
-- Primary Key structure for table activity_checkin
-- ----------------------------
ALTER TABLE [dbo].[activity_checkin] ADD CONSTRAINT [PK__activity__234E211577BF37A2] PRIMARY KEY CLUSTERED ([activity_checkin_id])
WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON)  
ON [PRIMARY]
GO


-- ----------------------------
-- Auto increment value for activity_comment
-- ----------------------------
DBCC CHECKIDENT ('[dbo].[activity_comment]', RESEED, 1)
GO


-- ----------------------------
-- Primary Key structure for table activity_comment
-- ----------------------------
ALTER TABLE [dbo].[activity_comment] ADD CONSTRAINT [PK__comment__E795768751BEE24F] PRIMARY KEY CLUSTERED ([activity_comment_id])
WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON)  
ON [PRIMARY]
GO


-- ----------------------------
-- Auto increment value for activity_prize
-- ----------------------------
DBCC CHECKIDENT ('[dbo].[activity_prize]', RESEED, 1)
GO


-- ----------------------------
-- Primary Key structure for table activity_prize
-- ----------------------------
ALTER TABLE [dbo].[activity_prize] ADD CONSTRAINT [PK__prize__6EC2CFD99BE86F09] PRIMARY KEY CLUSTERED ([activity_prize_id])
WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON)  
ON [PRIMARY]
GO


-- ----------------------------
-- Auto increment value for activity_sub
-- ----------------------------
DBCC CHECKIDENT ('[dbo].[activity_sub]', RESEED, 1)
GO


-- ----------------------------
-- Primary Key structure for table activity_sub
-- ----------------------------
ALTER TABLE [dbo].[activity_sub] ADD CONSTRAINT [PK__activity__F3E909302D0FB6DC] PRIMARY KEY CLUSTERED ([activity_sub_id])
WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON)  
ON [PRIMARY]
GO


-- ----------------------------
-- Auto increment value for agenda
-- ----------------------------
DBCC CHECKIDENT ('[dbo].[agenda]', RESEED, 5)
GO


-- ----------------------------
-- Primary Key structure for table agenda
-- ----------------------------
ALTER TABLE [dbo].[agenda] ADD CONSTRAINT [PK__agenda__461B3C8538D30526] PRIMARY KEY CLUSTERED ([agenda_id])
WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON)  
ON [PRIMARY]
GO


-- ----------------------------
-- Auto increment value for agenda_comment
-- ----------------------------
DBCC CHECKIDENT ('[dbo].[agenda_comment]', RESEED, 6)
GO


-- ----------------------------
-- Primary Key structure for table agenda_comment
-- ----------------------------
ALTER TABLE [dbo].[agenda_comment] ADD CONSTRAINT [PK__agenda_c__ADBB315894A69E72] PRIMARY KEY CLUSTERED ([agenda_comment_id])
WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON)  
ON [PRIMARY]
GO


-- ----------------------------
-- Auto increment value for agenda_sub
-- ----------------------------
DBCC CHECKIDENT ('[dbo].[agenda_sub]', RESEED, 1)
GO


-- ----------------------------
-- Primary Key structure for table agenda_sub
-- ----------------------------
ALTER TABLE [dbo].[agenda_sub] ADD CONSTRAINT [PK__subscrip__694106B0C209A486] PRIMARY KEY CLUSTERED ([agenda_sub_id])
WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON)  
ON [PRIMARY]
GO


-- ----------------------------
-- Auto increment value for download
-- ----------------------------
DBCC CHECKIDENT ('[dbo].[download]', RESEED, 1)
GO


-- ----------------------------
-- Primary Key structure for table download
-- ----------------------------
ALTER TABLE [dbo].[download] ADD CONSTRAINT [PK__download__2EDDE1CDD8BAE179] PRIMARY KEY CLUSTERED ([download_id])
WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON)  
ON [PRIMARY]
GO


-- ----------------------------
-- Auto increment value for exhibitor
-- ----------------------------
DBCC CHECKIDENT ('[dbo].[exhibitor]', RESEED, 1)
GO


-- ----------------------------
-- Primary Key structure for table exhibitor
-- ----------------------------
ALTER TABLE [dbo].[exhibitor] ADD CONSTRAINT [PK__exhibito__ACF15560C3ABACC6] PRIMARY KEY CLUSTERED ([exhibitor_id])
WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON)  
ON [PRIMARY]
GO


-- ----------------------------
-- Auto increment value for expert
-- ----------------------------
DBCC CHECKIDENT ('[dbo].[expert]', RESEED, 7)
GO


-- ----------------------------
-- Primary Key structure for table expert
-- ----------------------------
ALTER TABLE [dbo].[expert] ADD CONSTRAINT [PK__expert__DFEB67E5A3F1ECA7] PRIMARY KEY CLUSTERED ([expert_id])
WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON)  
ON [PRIMARY]
GO


-- ----------------------------
-- Auto increment value for flow
-- ----------------------------
DBCC CHECKIDENT ('[dbo].[flow]', RESEED, 9)
GO


-- ----------------------------
-- Primary Key structure for table flow
-- ----------------------------
ALTER TABLE [dbo].[flow] ADD CONSTRAINT [PK__flow__1DDE38A347EDA089] PRIMARY KEY CLUSTERED ([flow_id])
WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON)  
ON [PRIMARY]
GO


-- ----------------------------
-- Auto increment value for information
-- ----------------------------
DBCC CHECKIDENT ('[dbo].[information]', RESEED, 1)
GO


-- ----------------------------
-- Primary Key structure for table information
-- ----------------------------
ALTER TABLE [dbo].[information] ADD CONSTRAINT [PK__informat__26E2EF41736C8F4D] PRIMARY KEY CLUSTERED ([information_id])
WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON)  
ON [PRIMARY]
GO


-- ----------------------------
-- Auto increment value for luckydraw
-- ----------------------------
DBCC CHECKIDENT ('[dbo].[luckydraw]', RESEED, 1)
GO


-- ----------------------------
-- Primary Key structure for table luckydraw
-- ----------------------------
ALTER TABLE [dbo].[luckydraw] ADD CONSTRAINT [PK__luckydra__7057104ECEF4EE86] PRIMARY KEY CLUSTERED ([luckydraw_id])
WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON)  
ON [PRIMARY]
GO


-- ----------------------------
-- Auto increment value for passage
-- ----------------------------
DBCC CHECKIDENT ('[dbo].[passage]', RESEED, 1)
GO


-- ----------------------------
-- Primary Key structure for table passage
-- ----------------------------
ALTER TABLE [dbo].[passage] ADD CONSTRAINT [PK__passage__DE28CAFDA3DC2B1E] PRIMARY KEY CLUSTERED ([passage_id])
WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON)  
ON [PRIMARY]
GO


-- ----------------------------
-- Auto increment value for passage_comment
-- ----------------------------
DBCC CHECKIDENT ('[dbo].[passage_comment]', RESEED, 1)
GO


-- ----------------------------
-- Primary Key structure for table passage_comment
-- ----------------------------
ALTER TABLE [dbo].[passage_comment] ADD CONSTRAINT [PK__passage___78E206E0FCC48676] PRIMARY KEY CLUSTERED ([passage_comment_id])
WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON)  
ON [PRIMARY]
GO


-- ----------------------------
-- Auto increment value for passage_count
-- ----------------------------
DBCC CHECKIDENT ('[dbo].[passage_count]', RESEED, 1)
GO


-- ----------------------------
-- Primary Key structure for table passage_count
-- ----------------------------
ALTER TABLE [dbo].[passage_count] ADD CONSTRAINT [PK__passage___ECAEE7A89E28E22C] PRIMARY KEY CLUSTERED ([passage_count_id])
WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON)  
ON [PRIMARY]
GO


-- ----------------------------
-- Auto increment value for passage_like
-- ----------------------------
DBCC CHECKIDENT ('[dbo].[passage_like]', RESEED, 1)
GO


-- ----------------------------
-- Primary Key structure for table passage_like
-- ----------------------------
ALTER TABLE [dbo].[passage_like] ADD CONSTRAINT [PK__passage___25E9253F49652779] PRIMARY KEY CLUSTERED ([passage_like_id])
WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON)  
ON [PRIMARY]
GO


-- ----------------------------
-- Auto increment value for payment
-- ----------------------------
DBCC CHECKIDENT ('[dbo].[payment]', RESEED, 1)
GO


-- ----------------------------
-- Primary Key structure for table payment
-- ----------------------------
ALTER TABLE [dbo].[payment] ADD CONSTRAINT [PK__payment__ED1FC9EA6BEF0335] PRIMARY KEY CLUSTERED ([payment_id])
WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON)  
ON [PRIMARY]
GO


-- ----------------------------
-- Auto increment value for point_detail
-- ----------------------------
DBCC CHECKIDENT ('[dbo].[point_detail]', RESEED, 1)
GO


-- ----------------------------
-- Primary Key structure for table point_detail
-- ----------------------------
ALTER TABLE [dbo].[point_detail] ADD CONSTRAINT [PK__point_de__35D152342CD97F7F] PRIMARY KEY CLUSTERED ([point_detail_id])
WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON)  
ON [PRIMARY]
GO


-- ----------------------------
-- Auto increment value for point_prize
-- ----------------------------
DBCC CHECKIDENT ('[dbo].[point_prize]', RESEED, 1)
GO


-- ----------------------------
-- Primary Key structure for table point_prize
-- ----------------------------
ALTER TABLE [dbo].[point_prize] ADD CONSTRAINT [PK__point_pr__2C0D6D49078778E7] PRIMARY KEY CLUSTERED ([point_prize_id])
WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON)  
ON [PRIMARY]
GO


-- ----------------------------
-- Auto increment value for point_rule
-- ----------------------------
DBCC CHECKIDENT ('[dbo].[point_rule]', RESEED, 1)
GO


-- ----------------------------
-- Primary Key structure for table point_rule
-- ----------------------------
ALTER TABLE [dbo].[point_rule] ADD CONSTRAINT [PK__point_ru__9D4E7AEBE85FAADF] PRIMARY KEY CLUSTERED ([point_rule_id])
WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON)  
ON [PRIMARY]
GO


-- ----------------------------
-- Auto increment value for registration
-- ----------------------------
DBCC CHECKIDENT ('[dbo].[registration]', RESEED, 1)
GO


-- ----------------------------
-- Primary Key structure for table registration
-- ----------------------------
ALTER TABLE [dbo].[registration] ADD CONSTRAINT [PK__registra__22A298F6E26FACB3] PRIMARY KEY CLUSTERED ([registration_id])
WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON)  
ON [PRIMARY]
GO


-- ----------------------------
-- Auto increment value for speaker
-- ----------------------------
DBCC CHECKIDENT ('[dbo].[speaker]', RESEED, 1)
GO


-- ----------------------------
-- Primary Key structure for table speaker
-- ----------------------------
ALTER TABLE [dbo].[speaker] ADD CONSTRAINT [PK__speaker__56ECB7CFE94A5194] PRIMARY KEY CLUSTERED ([speaker_id])
WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON)  
ON [PRIMARY]
GO


-- ----------------------------
-- Auto increment value for user_checkin
-- ----------------------------
DBCC CHECKIDENT ('[dbo].[user_checkin]', RESEED, 1)
GO


-- ----------------------------
-- Primary Key structure for table user_checkin
-- ----------------------------
ALTER TABLE [dbo].[user_checkin] ADD CONSTRAINT [PK__user_che__A6E0B241020F7A4C] PRIMARY KEY CLUSTERED ([user_checkin_id])
WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON)  
ON [PRIMARY]
GO


-- ----------------------------
-- Auto increment value for user_info
-- ----------------------------
DBCC CHECKIDENT ('[dbo].[user_info]', RESEED, 1)
GO


-- ----------------------------
-- Primary Key structure for table user_info
-- ----------------------------
ALTER TABLE [dbo].[user_info] ADD CONSTRAINT [PK__user_inf__B9BE370FFB3E4890] PRIMARY KEY CLUSTERED ([user_id])
WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON)  
ON [PRIMARY]
GO


-- ----------------------------
-- Auto increment value for user_luckydraw
-- ----------------------------
DBCC CHECKIDENT ('[dbo].[user_luckydraw]', RESEED, 1)
GO


-- ----------------------------
-- Primary Key structure for table user_luckydraw
-- ----------------------------
ALTER TABLE [dbo].[user_luckydraw] ADD CONSTRAINT [PK__user_luc__34BF970A794DC6CF] PRIMARY KEY CLUSTERED ([user_luckydraw_id])
WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON)  
ON [PRIMARY]
GO

